package com.junhong.service.impl;

import java.io.Serializable;
import java.util.List;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.junhong.dao.TeacherDao;
import com.junhong.entity.Teacher;
import com.junhong.service.TeacherService;
@Transactional
@Service("teacherService")
public class TeacherServiceImpl implements TeacherService{

	@Resource
	private TeacherDao teacherDao;
	
	@Override
	public void add(Teacher teacher) {
		teacherDao.add(teacher);
	}

	@Override
	public void update(Teacher teacher) {
		teacherDao.update(teacher);
	}

	@Override
	public void delete(Teacher teacher) {
		teacherDao.delete(teacher);
	}

	@Override
	public List<Teacher> find() {
		return teacherDao.find();
	}

	@Override
	public List<Teacher> find(Integer pos, Integer rows) {
		return teacherDao.find(pos, rows);
	}

	@Override
	public Teacher getById(Serializable id) {
		return teacherDao.getById(id);
	}

	@Override
	public long count() {
		return teacherDao.count();
	}

}
